package com.wang.ymcc.web.controller;

import com.wang.lwm.result.JSONResult;
import com.wang.ymcc.dot.bluckdto;
import com.wang.ymcc.service.IBluckService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("/messageSms1")
public class bluckController {
    @Autowired
    private IBluckService bluckService;

    @PostMapping("/bluckadd")
    public JSONResult bluckadd(@RequestBody bluckdto bluckdto){
        bluckService.add(bluckdto);
        return JSONResult.success();
    }

    @PostMapping("/lahei")
    public JSONResult lahei(@RequestBody bluckdto bluckdto){
        List<bluckdto> list = bluckService.lahei(bluckdto);
        return JSONResult.success(list);
    }

}
